<?php

namespace App\Admin\Controllers;

use App\ContractType;
use Encore\Admin\Controllers\AdminController;
use Encore\Admin\Form;
use Encore\Admin\Grid;
use Encore\Admin\Show;

class ContractTypeController extends AdminController
{
    /**
     * Title for current resource.
     *
     * @var string
     */
    protected $title = '合同类型';

    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid()
    {
        $grid = new Grid(new ContractType());

        $grid->column('name', '合同类型');
        $grid->column('created_at', __('Updated at'));
        $grid->column('created_at', __('Created at'));
        $grid->disableExport();
        $grid->disableFilter();

        return $grid;
    }

    /**
     * Make a form builder.
     *
     * @return Form
     */
    protected function form()
    {
        $form = new Form(new ContractType());
        $form->text('name', '合同类型');
        return $form;
    }
}
